#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Taotie Ren
# import logging 
# 禁用日志模块
# logging.disable(logging.CRITICAL)
# logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s')
# import commons

# def run():
# 	inp = input('URL.')
# 	if inp == 'login':
# 		commons.login()
# 	elif inp == 'logout':
# 		commons.logout()
# 	elif inp == 'home':
# 		commons.home()
# 	else:
# 		print('404.')

def run():
	# account/login
	inp = input('URL.')
	m, f = inp.split('/')
	# import lib.account
	obj = __import__('lib.'+m , fromlist=True)
	if hasattr(obj, f):
		func = getattr(obj, f)
		func()
	else:
		print('404.')


	# # account/login
	# inp = input('URL.')
	# m, f = inp.split('/')
	# obj = __import__(m)
	# if hasattr(obj, f):
	# 	func = getattr(obj, f)
	# 	func()
	# else:
	# 	print('404.')
	# inp = input('URL.')
	# 反射：利用字符串的形式去对象（模块）中操作（寻找/检查/删除/设置）对象
	# delattr()
	#  setattr()
	# func = getattr(commons, "login")
	# if hasattr(commons, inp):
	# 	func = getattr(commons, inp)
	# 	func()
	# else:
	# 	print('404.')

if __name__ == '__main__':
    run()